package com.tecode.service.impl;

import com.tecode.bean.UserRejection;
import com.tecode.mapper.UserRejectionMapper;
import com.tecode.service.UserRejectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;

@Service
public class UserRejectionServiceImpl implements UserRejectionService {

    @Autowired
    private UserRejectionMapper userRejectionMapper;

    @Override
    public Integer selectUserTypeIdById(Integer id) {
        if (id!=0 || id!=null){
            return userRejectionMapper.selectUserTypeIdById(id);
        }
        return null;
    }

    @Override
    public Integer deleteRejectionUserById(Integer id) {
        if (id!=0 || id!=null){
            return userRejectionMapper.deleteRejectionUserById(id);
        }
        return 0;
    }

    @Override
    public Integer statisticsUserRejectionNum() {
        return userRejectionMapper.statisticsUserRejectionNum();
    }

    @Override
    public List<Object> selectUserRejection() {
        return userRejectionMapper.selectUserRejection();
    }

    @Override
    public Integer insertReject(UserRejection userRejection) {
        if(userRejection!=null){
            return userRejectionMapper.insertReject(userRejection);
        }
        return null;
    }
}
